package com.crazy.appium.page;

import com.crazy.appium.driver.CrazyMobileDriver;

import io.appium.java_client.MobileElement;

/**
 * @author 沙陌  qq2879897713
 *
 */
public class MinePage extends BasePage{
	public MobileElement getLogin_tv() {
		return getElement("loginTv");
	}
	//user_phone
	public MobileElement getUser_phone() {
		return getElement("user_phone");
	}
	public MobileElement getMine_img(){
		return getElement("mine_img");
	}

	/**
	 * @param driver
	 * @param configfile
	 */
	public MinePage(CrazyMobileDriver driver, String platform) {
		super(driver, platform);
		// TODO Auto-generated constructor stub
	}
	public void clickLoginTv(){
		getLogin_tv().click();
	}
	
	public String getUserPhone(){
		String text=getUser_phone().getText();
		return text;
	}
	public void clickUser_phone(){
		getUser_phone().click();
	}
	public void headImgFile() throws Exception{
		this.driver.takeScreenForElement(getMine_img(), "images/", "oldImg");
	}

}
